<template>
  <div>
      <h1 >页面详情</h1>
      <h2 >{{detail.productName}}</h2>
      <img :src="detail.productImageBig" alt="" style="width: 200px;">
    <div v-html="detail.detail"></div>

  </div>
</template>

<script>
export default {
    data() {
        return {
            detail:{}
            
        }
    },
    created() {
          this.getData()
    },
    methods: {
        getData(){
            this.$axios.get(`http://api.mm2018.com:8090/api/goods/productDet?productId=${this.$route.query.productId}`)
            .then(res=>{
                this.detail=res.data
                console.log(res.data);
            })
        }
    },
}
</script>

<style scoped>
div{
    text-align: center;
    margin: 10px auto;
}
h2{
     margin: 20px auto;
}
</style>